﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using CodeIn.Modules.Graph.Elements;

namespace CodeIn.Modules.Graph {
	public class GraphContext {
		private static GraphContext instance = new GraphContext();
		public static GraphContext Instance { get { return instance; } }

		private DataFlowGraph currentGraph;
		public DataFlowGraph CurrentGraph {
			get { return currentGraph; }
			set {
				currentGraph = value;
				if (CurrentGraphChanged != null)
					CurrentGraphChanged(this, new EventArgs());
			}
		}

		private GraphContext() {
		}

		// --------------------------------------------------------------------
		// Events
		// --------------------------------------------------------------------

		public event EventHandler CurrentGraphChanged;
	}
}
